# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=rifiuti2
pkgver=0.7.0
pkgrel=1
epoch=1
groups=('blackarch' 'blackarch-forensic' 'blackarch-recon')
pkgdesc='A rewrite of rifiuti, a great tool from Foundstone folks for analyzing Windows Recycle Bin INFO2 file.'
url='https://github.com/abelcheung/rifiuti2'
arch=('x86_64' 'aarch64')
license=('custom:BSD')
conflicts=('rifiuti')
depends=('glib2')
makedepends=('git')
source=("https://github.com/abelcheung/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.xz")
sha512sums=('1f538b70fa405f84d41f84e8f9d9f1d9e6c6badc1d50859a994bac0462b9bdba96f24c4fa16522f0f3ab4d4f95ca8fd9bbfee9477a324630542e2ebe92a835cc')

build() {
  cd "$pkgname-$pkgver"

  ./configure --prefix=/usr

  make
}

package() {
  cd "$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install

  install -Dm 644 docs/LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  rm docs/LICENSE.md
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" NEWS.md ChangeLog docs/*
}

